﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;

namespace GgcmsCSharp.ApiCtrls
{
    public class GgcmsAuthorizeAttribute: AuthorizeAttribute
    {
        private string power;
        public GgcmsAuthorizeAttribute(string power)
        {
            this.power = power;
        }
        protected override bool IsAuthorized(HttpActionContext actionContext)
        {
            
            return power=="vip";
        }
    }
}